<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8" />
    <title>账单修复</title>
    <script th:src="@{/js/jquery.js}"></script>

</head>
<body>

<form name="billInfo">
    <table>
        <tr>
            <td>id:</td>
            <td><input type="text" id="id" name="id" /></td>
        </tr>
        <tr>
            <td>startcount5:</td>
            <td><input type="text" id="startcount5" name="startcount5" /></td>
        </tr>
        <tr>
            <td>endcount5:</td>
            <td><input type="text" id="endcount5" name="endcount5"/></td>
        </tr>
        <tr>
            <td>price5:</td>
            <td><input type="text" id="price5" name="price5" /></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" value="提交" onclick="return add()" />
            </td>
        </tr>
    </table>


</form>
</body>


<script type="text/javascript">
    function add(){
        var id = billInfo.id.value;
        var startcount5 = billInfo.startcount5.value;
        var endcount5 = billInfo.endcount5.value;
        var price5 = billInfo.price5.value;
        $(document).ready(function(){
            $.post("/repair",
                {"id":id,"startcount5":startcount5,"endcount5":endcount5,"price5":price5},
                function(data){
                    if(data == true){
                        alert("成功");
                    }
                    if(data == false){
                        alert("失败");
                    }
                });
        });
    }
</script>
</html>